package com.qushiyun.devops.admin.sync.data.mapper;

import com.qushiyun.devops.admin.sync.data.po.TableLog;
import com.qushiyun.devops.common.framework.web.mapper.BaseMapperPlus;
import java.util.Date;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 表同步日志
 *
 * @author zhouzx
 */
@Mapper
public interface TableLogMapper extends BaseMapperPlus<TableLog> {

    @Select("select last_sync_time from sync_table_log where trigger_id=#{triggerId} and table_name=#{table} order by id desc limit 1")
    Date getLastSyncTime(@Param("table") String table, @Param("triggerId") long triggerId);
}